// reset
* {
  // padding默认不撑大,以边框为准
  box-sizing: border-box;
  // 高亮
  outline: none;
}
html {
  font-size: 13px;
}
body {
  margin: 0;
  // 非衬线字体(横竖都差不多)
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.2em;
  background: #f1f1f1;
}

a {
  color: #999;
  text-decoration: none;
}
li {
  list-style: none;
}
.flex-warp{
  flex-wrap: wrap;
}

// colors
$colors: (
  "primary": #db9e3f,
  "white": #fff,
  "light": #f9f9f9,
  "grey": #999,
  "dark-1": #343440,
  "dark": #222,
  "black": #000
);
@each $colorkey, $color in $colors {
  .text-#{$colorkey} {
    color: $color;
  }
  .bg-#{$colorkey} {
    background-color: $color;
  }
}
// text
@each $var in (left, center, right) {
  .text-#{$var} {
    text-align: $var;
  }
}
// font-size
$base-font-size: 1rem;
$font-sizes: (
  xs: 0.7692,
  // 10px
    sm: 0.9231,
  // 12px
    md: 1,
  // 13px
    lg: 1.0769,
  // 14px
    xl: 1.2308,
  // 16px
);
@each $sizekey, $size in $font-sizes {
  .fs-#{$sizekey} {
    font-size: $size * $base-font-size;
  }
}
// flex
.d-flex {
  display: flex;
}
.flex-colum {
  flex-direction: column;
}
.flex-1 {
  flex: 1;
}
.flex-grow-1 {
  flex-grow: 1;
}
// flex justify-content
$flex-jc: (
  start: flex-start,
  end: flex-end,
  center: center,
  between: space-between,
  around: space-around
);
@each $jckey, $jc in $flex-jc {
  .jc-#{$jckey} {
    justify-content: $jc;
  }
}
// flex align-items
$flex-ai: (
  start: flex-start,
  end: flex-end,
  center: center,
  stretch: stretch
);
@each $jckey, $jc in $flex-ai {
  .ai-#{$jckey} {
    align-items: $jc;
  }
}
// spacing
// 0-5
// .mt-1 => margin-top
// .pb-1 => padding-bottom
$spacing: (
  m: margin,
  p: padding
);
$spacing-directions: (
  t: top,
  r: right,
  b: bottom,
  l: left
);
$spacing-base-size: 1rem;
$spacing-sizes: (
  0: 0,
  1: 0.25,
  2: 0.5,
  3: 1,
  4: 1.5,
  5: 3,
);
@each $typekey, $type in $spacing {
  // m-0
  @each $sizekey, $size in $spacing-sizes{
    .#{$typekey}-#{$sizekey}{
      #{$type}: $size * $spacing-base-size
    }
  }
  // mx-0
  @each $sizekey, $size in $spacing-sizes{
    .#{$typekey}x-#{$sizekey}{
      #{$type}-left: $size * $spacing-base-size;
      #{$type}-right: $size * $spacing-base-size
    }
  }
  // my-0
  @each $sizekey, $size in $spacing-sizes{
    .#{$typekey}y-#{$sizekey}{
      #{$type}-top: $size * $spacing-base-size;
      #{$type}-top: $size * $spacing-base-size
    }
  }
  @each $directionskey, $direction in $spacing-directions {
    @each $sizekey, $size in $spacing-sizes{
      // .mt-1: 1 margin
      .#{$typekey}#{$directionskey}-#{$sizekey}{
        #{$type}-#{$direction}: $size * $spacing-base-size
      }
    }
  }
}